package com.example.dubboconsumerboot.consumer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.dubboproviderboot.provider.TestProvider;
import com.example.dubboproviderboot.provider.TestService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 *
 * @author: mapengyong
 * @Date: 2021/1/21 10:40 上午
 * @Description:
 **/
@Controller
public class TestConsumer {

    @Reference
    public TestService testProvider;

    @RequestMapping("/testConsumer")
    public void testConsumer(){
        System.out.println("这是服务消费者");
        System.out.println(testProvider.testProvider());
    }
}
